package com.zmn.oms.persistence.interfaces.conf.attachment;

import com.zmn.oms.model.entity.conf.attachment.product.ConfOrderAttachmentProduct;
import com.zmn.oms.model.entity.conf.attachment.product.ConfOrderAttachmentProductQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 描述: 附件配置-产品数据库访问
 *
 * @author weilai
 * @since   2022-06-08 17:50:43
 **/
public interface ConfOrderAttachmentProductDao {
    /**
     * 描述: 根据id查询数据
     *
     * @param id id
     * @return ConfOrderAttachmentProduct
     * @author weilai
     * @since 2022-06-08 17:50:43
     **/
     ConfOrderAttachmentProduct findById(Integer id);

    /**
     * 描述: 按条件查询数据 支持分页
     *
     * @param query 查询对象
     * @return List<ConfOrderAttachmentProduct>
     * @author weilai
     * @since 2022-06-08 17:50:43
     **/
    List<ConfOrderAttachmentProduct> listPageByQuery(ConfOrderAttachmentProductQuery query);

    /**
     * 描述: 按条件查询数据 不支持分页
     *
     * @param query 查询对象
     * @author weilai
     * @since 2022-06-08 17:50:43
     **/
    List<ConfOrderAttachmentProduct> listByQuery(ConfOrderAttachmentProductQuery query);

    /**
     * 描述: 批量查询
     *
     * @param confOrderAttachmentIds 查询对象
     * @author weilai
     * @since 2022-06-08 17:50:43
     **/
    List<ConfOrderAttachmentProduct> listBatch(@Param("confOrderAttachmentIds") List<Integer> confOrderAttachmentIds);

    /**
     * 描述: 批量查询
     *
     * @param servCategIds 服务id集合
     * @author weilai
     * @since 2022-06-08 17:50:43
     **/
    List<ConfOrderAttachmentProduct> listBatchByServCategIds(@Param("servCategIds") List<Integer> servCategIds);
    /**
     * 描述: 根据查询条件统计满足条件的数据条数
     *
     * @param query 查询对象
     * @return: Integer
     * @auther: weilai
     * @since: 2022-06-08 17:50:43
     */
    Integer countByQuery(ConfOrderAttachmentProductQuery query);

    /**
     * 描述: 根据id修改数据 id为必传
     *
     * @param ConfOrderAttachmentProduct 待修改数据
     * @return java.lang.Integer
     * @author weilai
     * @since  2022-06-08 17:50:43
     **/
    Integer updateByKey(ConfOrderAttachmentProduct ConfOrderAttachmentProduct);
            /**
     * 描述: 新增数据
     *
     * @param ConfOrderAttachmentProduct 待新增数据
     * @return java.lang.Integer 主键key
     * @author weilai
     * @since  2022-06-08 17:50:43
     **/
    Integer insert(ConfOrderAttachmentProduct ConfOrderAttachmentProduct);


    /**
     * 描述: 批量新增数据
     *
     * @param confOrderAttachmentProducts 待新增数据
     * @return java.lang.Integer 主键key
     * @author weilai
     * @since  2022-06-08 17:50:43
     **/
    Integer insertBatch(@Param("confOrderAttachmentProducts") List<ConfOrderAttachmentProduct> confOrderAttachmentProducts);

    /**
     * 描述: 根据主键删除数据
     *
     * @param id
     * @return: 执行结果码
     * @auther: weilai
     * @since: 2022-06-08 17:50:43
     */
    Integer deleteByKey(Integer id);

    /**
     * 描述: 根据照片配置id删除数据
     *
     * @param attachmentId 照片配置id
     * @return: 执行结果码
     * @auther: weilai
     * @since: 2022-06-08 17:50:43
     */
    Integer deleteByAttachmentId(@Param("attachmentId") Integer attachmentId);

}
